package cn.wolfcode.luowowo.search.query;

import cn.wolfcode.luowowo.common.query.QueryObject;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.domain.PageRequest;

@Setter
@Getter
public class SearchQueryObject extends QueryObject {
    public static final int DESTINATION_SEARCH = 0;
    public static final int STRATEGY_SEARCH = 1;
    public static final int TRAVEL_SEARCH = 2;
    public static final int USERINFO_SEARCH = 3;
    private int type = -1;
    public PageRequest getPageable(){
        return PageRequest.of(super.getCurrentPage()-1,super.getPageSize());
    }
}
